<block name="body"> 	
    <form action="{:U()}" method="post" id="info_form" name="info_form"  class="form-horizontal form-wrap"> 
	   <table class="table_form" style="width:600px">
           <tr>
              <th>名称</th>
              <td>
                  <input type="text" class="text input-7x" name="position_name"  id="position_name"  value="{$info.position_name|default=''}">
				  <input type="hidden" name="id" value="{$id}">
                   <span class="check-tips"></span>
              </td>
           <tr>
           <tr>
              <th>广告位宽度</th>
              <td>
                <input type="text" class="text input-small" name="ad_width" value="{$info.ad_width|default=0}">
				<span class="check-tips"></span>
              </td>
           <tr>
           <tr>
              <th>广告位高度</th>
              <td>
                <input type="text" class="text input-small" name="ad_height" value="{$info.ad_height|default=0}">
				<span class="check-tips"></span>
              </td>
           <tr>

           <tr>
              <th>广告描述</th>
              <td>
                  <input type="text" class="text input-7x" name="position_desc" value="{$info.position_desc|default=''}">
				  <span class="check-tips"></span>
              </td>
           <tr>
 
           <tr>
              <th>状态</th>
              <td>
                <label class="radio"><input type="radio" name="is_open"  <eq name="info[is_open]" value="1"> checked </eq>  value="1">开启</label>
                <label class="radio"><input type="radio" name="is_open"  <neq name="info[is_open]" value="1"> checked </neq>  value="0">关闭</label>
              </td>
           <tr>    
       </table>  
    </form>
</block>

<block name="script">
<script type="text/javascript" charset="utf-8">                 
 
    $(function() {       
      $('#info_form').ajaxForm({beforeSubmit: showloading, success: complate, dataType: 'json'});         
       function showloading() { 
		   name=$('#position_name').val();
		   if(name==''){
			   think.tip_error('名称不能为空!');
			   return false;
			  }
        }  
        function complate(result) {
            if (result.status == 1) {
                  think.tip_success('保存成功');
                  window.location.reload();
            } else {
                think.tip_error(result.msg);
            }
        }
    });

</script>  
</block>